<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title></title>
</head>
<body>
<script type="text/javascript" src="../lib/socket.io.js"></script>
<script type="text/javascript">
    var socket = io.connect('http://localhost');
    socket.on('news', function (data) {
        console.log(typeof data);
        socket.emit('my other event', { my: 'data' });
    });

</script>

</body>
</html>